<SCRIPT src="/js/jquery.js" type="text/javascript"></SCRIPT>
<SCRIPT src="/js/watch.js" type="text/javascript"></SCRIPT>

<!--TPL:if $type == 'just_released' -->
<!--TPL:foreach name=outer from=$recent_releases item=item-->
<!--TPL:if $smarty.foreach.outer.first-->
<a name="released"></a>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Just released&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/releases/recent" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_recent_releases" name="filter_recent_releases">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>

    <TR>
        <TD width="100%">
            <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
                <TR>
                    <TD width="100%">
                        <TABLE width="100%" border="0" cellspacing="2" cellpadding="2">
                            <TR>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Artist</a>
                                </TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release name</a>
                                </TH>
				<TH nowrap>
				    <a class="tablehead" href="#">Genre</a>
				</TH>
                                <TH nowrap>
				    <a class="tablehead" href="#">Record type</a>
				</TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release date</a>
                                </TH>
                            </TR>
    <!--TPL:/if-->
                            <!--TPL:cycle values="0,1" name="tr2" print=false assign="tr_class"-->
                            <TR class="data_<!--TPL:$tr_class-->">
                                <TD class="artist_name">
                                    <a style="color: #000000;" href="/artist/<!--TPL:$item.artist_name|wrapArtistLink-->">
                                        <!--TPL:$item.artist_name-->
                                    </a>
                                </TD>
                                <TD class="release_name">
                                    <a style="color: #000000;" href="/release/<!--TPL:$item.id-->">
                                        <!--TPL:$item.name|wrapReleaseName-->
                                    </a>
                                </TD>
				<TD class="tag_name">
                                    <!--TPL:if $smarty.request.filter_recent_releases-->
                                    <!--TPL:$item.genre|filterGenre:$smarty.request.filter_recent_releases|wrapTagName-->
                                    <!--TPL:else-->
                                    <!--TPL:$item.genre|firstGenre|wrapTagName-->
                                    <!--TPL:/if-->
				</TD>
                                <TD class="record_type_name">
				    <!--TPL:$item.record_type-->
				</TD>
                                <TD align="center">
                                    <!--TPL:$item.release_date|strtotime|date_format-->
                                </TD>
                            </TR>
    <!--TPL:if $smarty.foreach.outer.last-->
                        </TABLE>
                    </TD>
                </TR>
	    </TABLE>
	</TD>
    </TR>
</TABLE>
<!--TPL:/if-->
<!--TPL:foreachelse-->
<a name="released"></a>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Just released&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/releases/recent" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_recent_releases" name="filter_recent_releases">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>
   <TR>
       <TD>
	   No data
       </TD>
   </TR>
</TABLE>
<!--TPL:/foreach-->

<!--TPL:elseif $type == 'upcoming_releases'-->

<!--TPL:foreach name=outer from=$upcoming_schedules item=item-->
<!--TPL:if $smarty.foreach.outer.first-->
<a name="upcoming"></a>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Upcoming releases&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/schedules/upcoming#upcoming" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_upcoming" name="filter_upcoming">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>
    <TR>
        <TD width="100%">
            <TABLE cellspacing="0" cellpadding="0" width="100%">
                <TR>
                    <TD width="100%">
                        <TABLE width="100%" border="0" cellspacing="2" cellpadding="2">
                            <TR>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Artist</a>
                                </TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release name</a>
                                </TH>
				<TH nowrap>
				    <a class="tablehead" href="#">Genre</a>
				</TH>
                                <TH nowrap>
				    <a class="tablehead" href="#">Record type</a>
				</TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release date</a>
                                </TH>
				<!--TPL:if $user->id != 0 -->
                                <TH nowrap>
                                    <a class="tablehead" href="#">Add to watch-list</a>
                                </TH>
				<!--TPL:/if-->
                            </TR>
    <!--TPL:/if-->
                            <!--TPL:cycle values="0,1" name="tr3" print=false assign="tr_class"-->
                            <TR class="data_<!--TPL:$tr_class-->">
                                <TD class="artist_name">
                                    <a style="color: #000000;" href="/artist/<!--TPL:$item.artist_name|wrapArtistLink-->">
                                        <!--TPL:$item.artist_name-->
                                    </a>
                                </TD>
                                <TD class="release_name">
                                    <a style="color: #000000;" href="/release/<!--TPL:$item.id-->">
                                        <!--TPL:if ($item.tba == 't') -->
                                        <span style="font-style: italic;">To be announced</span>
                                        <!--TPL:else-->
                                        <!--TPL:$item.name|wrapReleaseName-->
                                        <!--TPL:/if-->
                                    </a>
                                </TD>
				<TD class="tag_name">
                                    <!--TPL:if $smarty.request.filter_upcoming-->
                                    <!--TPL:$item.genre|filterGenre:$smarty.request.filter_upcoming|wrapTagName-->
                                    <!--TPL:else-->
                                    <!--TPL:$item.genre|firstGenre|wrapTagName-->
                                    <!--TPL:/if-->
				</TD>
                                <TD class="record_type_name">
				    <!--TPL:$item.record_type-->
				</TD>
                                <TD>
                                    <!--TPL:if preg_match('/[0-9]{4}\-[0-9]{2}\-[0-9]{2}/', $item.schedule_date)-->
                                        <!--TPL:$item.schedule_date|strtotime|date_format-->
                                    <!--TPL:else-->
                                        <!--TPL:$item.schedule_date-->
                                    <!--TPL:/if-->
                                </TD>
                                <!--TPL:if $user->id != 0 -->
                                <TD style="text-align: center;">

                                    <!--TPL:if empty($item.user_id)-->
				    <a id="w<!--TPL:$item.id-->r" href="#" class="button" onclick="watchRelease('<!--TPL:$item.id-->'); return false;">Watch it</a>
                                    <!--TPL:else-->
                                    Watching
                                    <!--TPL:/if-->
                                </TD>
                                <!--TPL:/if-->
                            </TR>
    <!--TPL:if $smarty.foreach.outer.last-->
                        </TABLE>
                    </TD>
                </TR>
	    </TABLE>
	</TD>
    </TR>
</TABLE>
<!--TPL:/if-->
<!--TPL:foreachelse-->
<a name="upcoming"></a>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Upcoming releases&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/schedules/upcoming#upcoming" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_upcoming" name="filter_upcoming">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>
   <TR>
       <TD>
	   No data
       </TD>
   </TR>
</TABLE>
<!--TPL:/foreach-->

<br>
<!--TPL:foreach name=outer from=$announced_schedules item=item-->
<!--TPL:if $smarty.foreach.outer.first-->
<a name="announced"></a>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Announced releases&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/schedules/upcoming#announced" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_upcoming" name="filter_upcoming">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>
    <TR>
        <TD width="100%">
            <TABLE cellspacing="0" cellpadding="0" width="100%">
                <TR>
                    <TD width="100%">
                        <TABLE width="100%" border="0" cellspacing="2" cellpadding="2">
                            <TR>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Artist</a>
                                </TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release name</a>
                                </TH>
				<TH nowrap>
				    <a class="tablehead" href="#">Genre</a>
				</TH>
                                <TH nowrap>
				    <a class="tablehead" href="#">Record type</a>
				</TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release date</a>
                                </TH>
				<!--TPL:if $user->id != 0 -->
                                <TH nowrap>
                                    <a class="tablehead" href="#">Add to watch-list</a>
                                </TH>
				<!--TPL:/if-->
                            </TR>
    <!--TPL:/if-->
                            <!--TPL:cycle values="0,1" name="tr4" print=false assign="tr_class"-->
                            <TR class="data_<!--TPL:$tr_class-->">
                                <TD class="artist_name">
                                    <a style="color: #000000;" href="/artist/<!--TPL:$item.artist_name|wrapArtistLink-->">
                                        <!--TPL:$item.artist_name-->
                                    </a>
                                </TD>
                                <TD class="release_name">
                                    <a style="color: #000000;" href="/release/<!--TPL:$item.id-->">
                                        <!--TPL:if ($item.tba == 't') -->
                                        <span style="font-style: italic;">To be announced</span>
                                        <!--TPL:else-->
                                        <!--TPL:$item.name|wrapReleaseName-->
                                        <!--TPL:/if-->
                                    </a>
                                </TD>
				<TD class="tag_name">
                                    <!--TPL:if $smarty.request.filter_upcoming-->
                                    <!--TPL:$item.genre|filterGenre:$smarty.request.filter_upcoming|wrapTagName-->
                                    <!--TPL:else-->
                                    <!--TPL:$item.genre|firstGenre|wrapTagName-->
                                    <!--TPL:/if-->
				</TD>
                                <TD class="record_type_name">
				    <!--TPL:$item.record_type-->
				</TD>
                                <TD>
                                    <!--TPL:if preg_match('/[0-9]{4}\-[0-9]{2}\-[0-9]{2}/', $item.schedule_date)-->
                                        <!--TPL:$item.schedule_date|strtotime|date_format-->
                                    <!--TPL:else-->
                                        <!--TPL:$item.schedule_date-->
                                    <!--TPL:/if-->
                                </TD>
                                <!--TPL:if $user->id != 0 -->
                                <TD style="text-align: center;">

                                    <!--TPL:if empty($item.user_id)-->
				    <a id="w<!--TPL:$item.id-->r" href="#" class="button" onclick="watchRelease('<!--TPL:$item.id-->'); return false;">Watch it</a>
                                    <!--TPL:else-->
                                    Watching
                                    <!--TPL:/if-->
                                </TD>
                                <!--TPL:/if-->
                            </TR>
    <!--TPL:if $smarty.foreach.outer.last-->
                        </TABLE>
                    </TD>
                </TR>
	    </TABLE>
	</TD>
    </TR>
</TABLE>
<!--TPL:/if-->
<!--TPL:foreachelse-->
<a name="announced"></a>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Announced releases&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/schedules/upcoming#announced" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_upcoming" name="filter_upcoming">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>
   <TR>
       <TD>
	   No data
       </TD>
   </TR>
</TABLE>
<!--TPL:/foreach-->


<!--TPL:else-->












<!--TPL:foreach name=outer from=$recent_schedules item=item-->
<!--TPL:if $smarty.foreach.outer.first-->
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Recently added&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/schedules/recent" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_recent_schedules" name="filter_recent_schedules">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>

    <TR>
        <TD width="100%">
            <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
                <TR>
                    <TD width="100%">
                        <TABLE width="100%" border="0" cellspacing="2" cellpadding="2">
                            <TR>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Artist</a>
                                </TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release name</a>
                                </TH>
				<TH nowrap>
				    <a class="tablehead" href="#">Genre</a>
				</TH>
                                <TH nowrap>
				    <a class="tablehead" href="#">Record type</a>
				</TH>
                                <TH nowrap>
                                    <a class="tablehead" href="#">Release date</a>
                                </TH>
                                <!--TPL:if $user->id != 0 -->
				<TH nowrap>
                                    <a class="tablehead" href="#">Add to watch-list</a>
                                </TH>
				<!--TPL:/if-->
                            </TR>
   <!--TPL:/if-->
                            <!--TPL:cycle values="0,1" name="tr" print=false assign="tr_class"-->

                            <TR class="data_<!--TPL:$tr_class-->">
                                <TD class="artist_name">
                                    <a style="color: #000000;" href="/artist/<!--TPL:$item.artist_name|wrapArtistLink-->">
                                        <!--TPL:$item.artist_name-->
                                    </a>
                                </TD>
                                <TD class="release_name">
                                    <a style="color: #000000;" href="/release/<!--TPL:$item.id-->">
                                        <!--TPL:if ($item.tba == 't') -->
                                        <span style="font-style: italic;">To be announced</span>
                                        <!--TPL:else-->
                                        <!--TPL:$item.name|wrapReleaseName-->
                                        <!--TPL:/if-->
                                    </a>
                                </TD>
				<TD class="tag_name">
                                    <!--TPL:if $smarty.request.filter_recent_schedules-->
                                    <!--TPL:$item.genre|filterGenre:$smarty.request.filter_recent_schedules|wrapTagName-->
                                    <!--TPL:else-->
                                    <!--TPL:$item.genre|firstGenre|wrapTagName-->
                                    <!--TPL:/if-->
				</TD>
                                <TD class="record_type_name">
				    <!--TPL:$item.record_type-->
				</TD>
                                <TD>
                                    <!--TPL:if preg_match('/[0-9]{4}\-[0-9]{2}\-[0-9]{2}/', $item.schedule_date)-->
                                        <!--TPL:$item.schedule_date|strtotime|date_format-->
                                    <!--TPL:else-->
                                        <!--TPL:$item.schedule_date-->
                                    <!--TPL:/if-->
                                </TD>
                                <!--TPL:if $user->id != 0 -->
                                <TD style="text-align: center;">

                                    <!--TPL:if empty($item.user_id)-->
                                    <a id="w<!--TPL:$item.id-->r" href="#" class="button" onclick="watchRelease('<!--TPL:$item.id-->'); return false;">Watch it</a>
                                    <!--TPL:else-->
                                    Watching
                                    <!--TPL:/if-->
                                </TD>
                                <!--TPL:/if-->
                            </TR>
<!--TPL:if $smarty.foreach.outer.last-->
                        </TABLE>
                    </TD>
                </TR>
	    </TABLE>
	</TD>
    </TR>
</TABLE>
<!--TPL:/if-->
<!--TPL:foreachelse-->
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="home_caption">
            <TABLE width="100%">
                <TR>
                    <TD>
                        <div style="float: left;">
                            &nbsp;Recently added&nbsp;
                        </div>
                    </TD>
                    <TD nowrap>
                        <div style="float: right;">
                            <FORM action="/schedules/recent" method="POST">
                                <small>filter by tag:</small>
                                <input type="text" size="10" class="flat" id="filter_recent_schedules" name="filter_recent_schedules">
                            </FORM>
                        </div>
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>
   <TR>
       <TD>
	   No data
       </TD>
   </TR>
</TABLE>
<!--TPL:/foreach-->

<!--TPL:/if-->